package com.flyme.common.rpc.util;

public enum RemoteType {
    HESSIAN,
    HTTP,
    TCP,
    UDP;

    private RemoteType() {
    }

    public static String isRemoteType(RemoteType type) {
        if (HESSIAN == type) {
            return "remote.hessianRemoteClientInternal";
        } else if (HTTP == type) {
            return "remote.httpRemoteClientInternal";
        } else if (TCP == type) {
            return "remote.tcpRemoteClientInternal";
        } else {
            return UDP == type ? "remote.udpRemoteClientInternal" : null;
        }
    }

    public static String getCleanRemoteType(RemoteType type) {
        if (HESSIAN == type) {
            return "HESSIAN";
        } else if (HTTP == type) {
            return "HTTP";
        } else if (TCP == type) {
            return "TCP";
        } else {
            return UDP == type ? "UDP" : null;
        }
    }
}
